{minimum_otp_vsn, "21.0"}.

{erl_opts, [debug_info,
            warn_export_all,
            warn_unused_vars,
            warn_shadow_vars,
            warn_unused_import,
            warn_obsolete_guard
           ]}.

{deps, [{cowlib, "2.8.0"},
        {gun, {git, "https://github.com/emqx/gun", {tag, "1.3.4"}}},
        {getopt, "1.0.1"}
       ]}.

{escript_name, emqtt_cli}.
{escript_main_app, emqtt}.
{escript_incl_apps, [getopt,gun,cowlib]}.
{escript_emu_args, "%%! -smp true +K true +A 16 +P 200000 -env ERL_MAX_PORTS 100000 -env ERTS_MAX_PORTS 100000\n"}.
{escript_shebang, "#!/usr/bin/env escript\n"}.

{profiles,
    [{test,
        [{deps,
            [{meck, "0.8.13"},
             {emqx, {git, "https://github.com/emqx/emqx", {branch, "master"}}},
             {emqx_ct_helpers, {git, "https://github.com/emqx/emqx-ct-helpers", {branch, "develop"}}}
            ]},
         {erl_opts, [debug_info]}
        ]},
      {escript, []},
      {emqtt,
        [{relx,
          [{release, {emqtt, git_describe}, [
            kernel,
            sasl,
            crypto,
           public_key,
           asn1,
           syntax_tools,
           ssl,
           os_mon,
           inets,
           compiler,
           runtime_tools
         ]},
         {overlay_vars,["vars.config"]},
         {overlay, [
           {copy, "_build/escript/bin/emqtt_cli", "bin/emqtt_cli"},
           {copy,"bin/emqtt","bin/emqtt"},
           {template,"bin/emqtt","bin/emqtt"}
         ]},
         {include_src, false},
         {extended_start_script, false},
         {generate_start_script, false},
         {sys_config, false},
         {vm_args, false}
         ]}
        ]},
      {emqtt_pkg,
        [{relx,
        [{release, {emqtt, git_describe}, [
           kernel,
           sasl,
           crypto,
           public_key,
           asn1,
           syntax_tools,
           ssl,
           os_mon,
           inets,
           compiler,
           runtime_tools
         ]},
         {overlay_vars,["vars-pkg.config"]},
         {overlay, [
           {copy, "_build/escript/bin/emqtt_cli", "bin/emqtt_cli"},
           {copy,"bin/emqtt","bin/emqtt"},
           {template,"bin/emqtt","bin/emqtt"}
         ]},
         {include_src, false},
         {extended_start_script, false},
         {generate_start_script, false},
         {sys_config, false},
         {vm_args, false}
         ]}
        ]}
    ]}.

{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.

{xref_checks, [undefined_function_calls]}.

{dialyzer_base_plt_apps,
 [kernel,
  stdlib,
  erts,
  sasl,
  ssl,
  syntax_tools,
  compiler,
  crypto]}.


